package cn.edu.cimv.service.impl;

import cn.edu.cimv.dao.entity.Honor;
import cn.edu.cimv.dao.mapper.HonorMapper;
import cn.edu.cimv.service.HonorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by 门铎 on 2016/6/27.
 */
@Service
public class HonorServiceImpl implements HonorService {
    @Autowired private HonorMapper honorMapper;
    @Override
    public void editHonor(Honor honor) {
        honorMapper.insertHonor(honor);
    }

    @Override
    public List<Honor> queryHonor() {
        return honorMapper.queryHonor();
    }

    @Override
    public void deleteHonor(int id) {
        honorMapper.deleteHonor(id);
    }

    @Override
    public Honor queryHonorById(int id) {
        return honorMapper.queryHonorById(id);
    }

    @Override
    public void updateHonor(Honor honor) {
        honorMapper.updateHonor(honor);
    }
}
